package pandora.bo.DCC;

import pandora.dto.TypeDTO;

public class TypePar implements Comparable<TypePar>{
	private TypeDTO type;
	private Integer count;
	
	public TypePar(TypeDTO type, Integer count){
		this.type = type;
		this.count = count;
	}

	public TypeDTO getType() {
		return type;
	}

	public void setType(TypeDTO type) {
		this.type = type;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public int compareTo(TypePar arg0) {
		if(this.getCount() < arg0.getCount())
			return -1;
		else if(this.getCount() > arg0.getCount())
			return 1;
		else
			return 0;
	}
	
	public String toString(){
		return this.type.getType()+": "+this.count.toString();
	}
}
